Platform Explorer / Nuxeo Platform LTS 2016 8.10

Extension point elasticSearchIndex

Documentation

Extension point used to setup an Elasticsearch index.

The one used to index Nuxeo documents must be of type "doc".

    <elasticSearchIndex create="true" name="nuxeo" type="doc">
        <settings/>
        <mapping/>
        <fetchFromSources>
            <include>ecm:*</include>
            <include>dc:*</include>
            <exclude>ecm:binaryFulltext</exclude>
        </fetchFromSources>
    </elasticSearchIndex>

@Since 5.9.3 name is the Elasticsearch index name.

type is the Elasticsearch type that hold a mapping, "doc" is the mapping for Nuxeo documents

create can be set to false if you don't want Nuxeo to initialize the index and mapping.

settings the Elasticsearch settings @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules.html

mapping the Elasticsearch mapping for the type @see http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping.html

@Since 5.9.5 fetchFromSources, include a list of field name pattern that will be included when fetching document from Elasticsearch (@see NxQueryBuilder.fetchFromElasticsearch) use the exclude list to prevent returning fulltext or long fields.

Contribution Descriptors

  • Class: org.nuxeo.elasticsearch.config.ElasticSearchIndexConfig

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-runtime-8.10.jar /Users/arnaud/Work/Nuxeo/distrib/nuxeo-server-8.10-tomcat/nxserver/config/elasticsearch-config.xml
    <extension point="elasticSearchIndex" target="org.nuxeo.elasticsearch.ElasticSearchComponent">
        <elasticSearchIndex name="nuxeo" repository="default" type="doc">
          <fetchFromSource>
            <include>ecm:*</include>
            <include>dc:*</include>
            <exclude>ecm:binarytext</exclude>
          </fetchFromSource>
    
          <settings>
    {
       "analysis" : {
          "filter" : {
             "truncate_filter" : {
                "length" : 256,
                "type" : "truncate"
             },
             "word_delimiter_filter" : {
               "type" : "word_delimiter",
               "preserve_original" : true
             },
             "asciifolding_filter" : {
                "type" : "asciifolding",
                "preserve_original" : true
             },
             "en_stem_filter" : {
                "name" : "minimal_english",
                "type" : "stemmer"
             },
             "en_stop_filter" : {
                "stopwords" : [
                   "_english_"
                ],
                "type" : "stop"
             },
             "fr_elision_filter" : {
                "articles" : [
                   "c",
                   "l",
                   "m",
                   "t",
                   "qu",
                   "n",
                   "s",
                   "j"
                ],
                "type" : "elision"
             },
             "fr_stem_filter" : {
                "name" : "minimal_french",
                "type" : "stemmer"
             },
             "fr_stop_filter" : {
                "stopwords" : [
                   "_french_"
                ],
                "type" : "stop"
             }
          },
          "tokenizer" : {
             "path_tokenizer" : {
                "delimiter" : "/",
                "type" : "path_hierarchy"
             }
          },
          "analyzer" : {
             "en_analyzer" : {
                "alias" : "fulltext",
                "char_filter":  [ "html_strip"],
                "filter" : [
                   "word_delimiter_filter",
                   "lowercase",
                   "en_stop_filter",
                   "en_stem_filter",
                   "asciifolding_filter"
                ],
                "type" : "custom",
                "tokenizer" : "standard"
             },
             "fr_analyzer" : {
                "char_filter":  [ "html_strip"],
                "filter" : [
                   "word_delimiter_filter",
                   "lowercase",
                   "fr_stop_filter",
                   "fr_stem_filter",
                   "asciifolding_filter",
                   "fr_elision_filter"
                ],
                "type" : "custom",
                "tokenizer" : "standard"
             },
             "path_analyzer" : {
                "type" : "custom",
                "tokenizer" : "path_tokenizer"
             },
             "lowercase_analyzer" : {
                "type" : "custom",
                "filter" : [ "truncate_filter", "lowercase", "asciifolding" ],
                "tokenizer" : "keyword"
             },
             "default" : {
                "type" : "custom",
                "filter" : [ "truncate_filter" ],
                "tokenizer" : "keyword"
             }
          }
       }
    }
          </settings>
          <mapping>
    {
       "_all" : {
          "analyzer" : "fulltext"
       },
       "dynamic_templates": [ {
          "no_thumbnail_template": {
             "path_match": "thumb:thumbnail.*",
             "mapping": {
                 "index": "no",
                 "include_in_all": false
                }
             }
          }, {
          "no_picture_template": {
             "path_match": "picture:views.*",
             "mapping": {
                "index": "no",
                "include_in_all": false
              }
           }
       } ],
       "properties" : {
          "dc:title" : {
             "type" : "multi_field",
             "fields" : {
               "dc:title" : {
                 "type" : "string"
               },
               "fulltext" : {
                 "boost": 2,
                 "type": "string",
                 "analyzer" : "fulltext"
              }
            }
          },
          "dc:description" : {
             "type" : "multi_field",
             "fields" : {
               "dc:description" : {
                 "index" : "no",
                 "include_in_all" : true,
                 "type" : "string"
               },
               "fulltext" : {
                 "boost": 1.5,
                 "type": "string",
                 "analyzer" : "fulltext"
              }
            }
          },
          "note:note" : {
             "type" : "multi_field",
             "fields" : {
               "note:note" : {
                 "index" : "no",
                 "include_in_all" : true,
                 "type" : "string"
               },
               "fulltext" : {
                 "type": "string",
                 "analyzer" : "fulltext"
              }
            }
          },
          "ecm:binarytext" : {
             "type" : "string",
             "index" : "no",
             "include_in_all" : true
          },
          "ecm:path" : {
             "type" : "multi_field",
             "fields" : {
                "children" : {
                   "analyzer" : "path_analyzer",
                   "search_analyzer" : "keyword",
                   "type" : "string"
                },
                "ecm:path" : {
                   "index" : "not_analyzed",
                   "type" : "string"
                }
             }
          },
          "ecm:pos": {
             "type": "integer"
          },
          "dc:created": {
             "format": "dateOptionalTime",
             "type": "date"
          },
          "dc:expired": {
             "format": "dateOptionalTime",
             "type": "date"
          },
          "dc:modified": {
             "format": "dateOptionalTime",
             "type": "date"
          },
          "common:icon": {
             "type": "string",
             "index" : "no",
             "include_in_all" : false
          }
       }
    }
          </mapping>
    
        </elasticSearchIndex>
      </extension>
  • nuxeo-runtime-8.10.jar /Users/arnaud/Work/Nuxeo/distrib/nuxeo-server-8.10-tomcat/nxserver/config/elasticsearch-audit-index-config.xml
    <extension point="elasticSearchIndex" target="org.nuxeo.elasticsearch.ElasticSearchComponent">
    
        <elasticSearchIndex name="nuxeo-audit" type="entry">
          <settings>{
       "analysis" : {
          "filter" : {
             "truncate_filter" : {
                "length" : 256,
                "type" : "truncate"
             },
             "word_delimiter_filter" : {
               "type" : "word_delimiter",
               "preserve_original" : true
             },
             "en_stem_filter" : {
                "name" : "minimal_english",
                "type" : "stemmer"
             },
             "en_stop_filter" : {
                "stopwords" : [
                   "_english_"
                ],
                "type" : "stop"
             }
         },
          "tokenizer" : {
             "path_tokenizer" : {
                "delimiter" : "/",
                "type" : "path_hierarchy"
             }
          },
          "analyzer" : {
             "en_analyzer" : {
                "alias" : "fulltext",
                "char_filter":  [ "html_strip"],
                "filter" : [
                   "word_delimiter_filter",
                   "lowercase",
                   "en_stop_filter",
                   "en_stem_filter"
                ],
                "type" : "custom",
                "tokenizer" : "standard"
             },
             "path_analyzer" : {
                "type" : "custom",
                "tokenizer" : "path_tokenizer"
             },
            "default" : {
                "type" : "custom",
                "filter" : [ "truncate_filter" ],
                "tokenizer" : "keyword"
             }
          }
       }
    }
          </settings>
          <mapping>
            {
               "_all" : {
                 "analyzer" : "fulltext"
              },
              "properties" : {
                "id" : {
                  "type" : "long"
                },
                "comment" : {
                  "type" : "multi_field",
                  "fields" : {
                    "comment" : {
                      "type" : "string"
                    },
                    "fulltext" : {
                      "type": "string",
                      "analyzer" : "fulltext"
                    }
                  }
                },
    	    "eventDate": {
    	      "format": "dateOptionalTime",
    	      "type": "date"
    	    },
    	    "logDate": {
    	      "format": "dateOptionalTime",
    	      "type": "date"
    	    },
                "docPath": {
                  "type" : "multi_field",
                  "fields" : {
                    "children" : {
                      "analyzer" : "path_analyzer",
                      "search_analyzer" : "keyword",
                      "type" : "string"
                    },
                    "docPath" : {
                      "index" : "not_analyzed",
                      "type" : "string"
                    }
                  }
                }
              }
            }
          </mapping>
        </elasticSearchIndex>
    
      </extension>
  • nuxeo-runtime-8.10.jar /Users/arnaud/Work/Nuxeo/distrib/nuxeo-server-8.10-tomcat/nxserver/config/elasticsearch-sequence-index-config.xml
    <extension point="elasticSearchIndex" target="org.nuxeo.elasticsearch.ElasticSearchComponent">
    
        <elasticSearchIndex name="nuxeo-uidgen" type="seqId">
    
          <settings>
            {
            "number_of_shards" : 1,
            "auto_expand_replicas" : "0-all"
            }
          </settings>
    
          <mapping>
            {
            "_source" : {"enabled": false},
            "_all" : {"enabled": false},
            "enabled" : false
            }
          </mapping>
    
        </elasticSearchIndex>
    
      </extension>